/*
 * Element.h
 *
 *  Created on: Jun 4, 2011
 *      Author: gilang
 */

#ifndef ELEMENT_H_
#define ELEMENT_H_

#define LINE 2
#define TRIANGULAR 3

#include "Matrix.h"
#include "Vector.h"
#include "Node.h"
#include "Material.h"


class Element {
protected:
	Matrix stiffMatrix,convMatrix;
	Vector loadVector,genVector,fluxVector,convVector;
	int label;
	Node *node;
	Material material;
	int num;
	bool last;

public:

	virtual void setStiffMatrix(Matrix &m)=0;
	virtual void setLoadVector(Vector &v)=0;
	virtual void setConvMatrix(Matrix &cm)=0;
	virtual void setGenVector(Vector &g)=0;
	virtual void setFluxVector(Vector &g)=0;
	virtual void setConvVector(Vector &c)=0;
	virtual void setLabel(int &label)=0;
	virtual int & getLabel()=0;
	virtual Matrix & getStiffMatrix()=0;
	virtual Matrix & getConvMatrix()=0;
	virtual Vector & getGenVector()=0;
	virtual Vector & getFluxVector()=0;
	virtual Vector & getConvVector()=0;
	virtual Vector & getLoadVector()=0;
	virtual void setNode(Node *node)=0;
	virtual Node * getNode()=0;

	virtual void addNode(int i, const Node &n)=0;
	virtual double dimLength()=0;
	virtual double operator()(int i, int j)=0;
	virtual double operator[](int i)=0;
	virtual Node & operator()(int i)=0;
	virtual Matrix constructLHS()=0;
	virtual Vector constructRHS()=0;

	virtual void setMaterial(const Material &mat)=0;
	virtual Material & getMaterial()=0;

	virtual void setNum(const int &num)=0;
	virtual int & getNum()=0;

	virtual void setLast(bool last)=0;
	virtual bool isLast()=0;


};

#endif /* ELEMENT_H_ */
